//****************************************************************************************************************

	        function getRadioValue(f, rkey)
	        {
	            for(i=0; i<f.elements[rkey].length;i++)
	            {
	                if(true == f.elements[rkey][i].checked)
	                {
	                    resolution = f.elements[rkey][i].value;
	                    return f.elements[rkey][i].value;
	                }
	            }
	            return -1;
	        }


//****************************************************************************************************************

	        function validateclient(name_form) 
	        {
	            var f = document.forms[name_form];
	            if(!f) {
	                alert('Wrong form!');
		            return false;
	            }
	
	            err = '';
	            if(f.elements['client_name'].value == '') 
	            {
	                err += "\n\tType your name";
	            }
	
		    var re = new RegExp("^[a-zA-Z]+[0-9a-zA-Z_]+@[0-9a-zA-Z]+[\.][a-zA-Z]+$");
		    if(re.exec(f.client_email.value) == null)
		    {
                	err += "\n\tWrong value for Email";
		    }

	            if(f.elements['client_password'].value == '') 
	            {
	                err += "\n\tType your password";
	            }


	            if(err != '') 
	            {
	                alert("You haven't fill all required fields:\n"+err);
	                return false;
	            }
	            return true;
	        }
	        
//****************************************************************************************************************
	        
	        function checkForm(name_form) 
	        {
	            var f = document.forms[name_form];
	            if(!f) {
	                alert('Wrong form!');
		            return false;
	            }
	
	            err = '';
	            if(f.elements['client_name'].value == '') 
	            {
	                err += "\n\tType your name";
	            }
	
			    var re = new RegExp("^[a-zA-Z]+[0-9a-zA-Z_]+@[0-9a-zA-Z]+[\.][a-zA-Z]+$");
			    if(re.exec(f.client_email.value) == null)
			    {
	                	err += "\n\tWrong value for Email";
			    }
	
				if('' == f.elements['client_password'].value) 
				{
			        err += "\n\tPassword is empty";
				}
				
			    if(f.client_phone.value == '')
	            {
	                err += "\n\tType your phone";
	            }
				
	            if(f.elements['client_billing_name'].value == '') 
	            {
	                err += "\n\tType your billing name";
	            }
	            
	            if(f.elements['client_billing_adress1'].value == '') 
	            {
	                err += "\n\tType your billing address1";
	            }
	
	            if(f.elements['client_billing_city'].value == '') 
	            {
	                err += "\n\tType your billing city";
	            }

	            if(f.elements['client_billing_zip'].value == '') 
	            {
	                err += "\n\tType your billing zip";
	            }

	            if(f.elements['client_billing_phone'].value == '') 
	            {
	                err += "\n\tType your billing phone number";
	            }


	            
	            if(getRadioValue(f, "client_cctype") == -1)
	            {
	                err += "\n\t Do not select Credit Card";
	            }
	            
	            if(f.elements['client_ccnumber'].value == '') 
	            {
                    err += "\n\tType your credit card number";
	            }

	            if(f.elements['client_cccvv'].value == '') 
	            {
                    err += "\n\tType your cvv";
	            }

	            if(f.elements['client_ccholdername'].value == '') 
	            {
                    err += "\n\tType Credit Card Owner";
	            }




	            if(err != '') 
	            {
	                alert("You haven't fill all required fields:\n"+err);
	                return false;
	            }
	            return true;
	        }


//******************************************************************

//****************************************************************************************************************
	        
//****************************************************************************************************************
	        
	        function checkForm(name_form) 
	        {
	            var f = document.forms[name_form];
	            if(!f) {
	                alert('Wrong form!');
		            return false;
	            }
	
	            err = '';
	            if(f.elements['client_name'].value == '') 
	            {
	                err += "\n\tType your name";
	            }
	
			    var re = new RegExp("^[a-zA-Z]+[0-9a-zA-Z_]+@[0-9a-zA-Z]+[\.][a-zA-Z]+$");
			    if(re.exec(f.client_email.value) == null)
			    {
	                	err += "\n\tWrong value for Email";
			    }
	
				if('' == f.elements['client_password'].value) 
				{
			        err += "\n\tPassword is empty";
				}
				
			    if(f.client_phone.value == '')
	            {
	                err += "\n\tType your phone";
	            }
				
	            if(f.elements['client_billing_name'].value == '') 
	            {
	                err += "\n\tType your billing name";
	            }
	            
	            if(f.elements['client_billing_adress1'].value == '') 
	            {
	                err += "\n\tType your billing address1";
	            }
	
	            if(f.elements['client_billing_city'].value == '') 
	            {
	                err += "\n\tType your billing city";
	            }

	            if(f.elements['client_billing_zip'].value == '') 
	            {
	                err += "\n\tType your billing zip";
	            }

	            if(f.elements['client_billing_phone'].value == '') 
	            {
	                err += "\n\tType your billing phone number";
	            }


	            

	            if(err != '') 
	            {
	                alert("You haven't fill all required fields:\n"+err);
	                return false;
	            }
	            return true;
	        }


//******************************************************************

//****************************************************************************************************************
	        

//****************************************************************************************************************
	        
	        function FullcheckForm(name_form) 
	        {
	            var f = document.forms[name_form];
	            if(!f) {
	                alert('Wrong form!');
		            return false;
	            }
	
	            err = '';
	            if(f.elements['client_name'].value == '') 
	            {
	                err += "\n\tType your name";
	            }
	
			    var re = new RegExp("^[a-zA-Z]+[0-9a-zA-Z_]+@[0-9a-zA-Z]+[\.][a-zA-Z]+$");
			    if(re.exec(f.client_email.value) == null)
			    {
	                	err += "\n\tWrong value for Email";
			    }
	
				if('' == f.elements['client_password'].value) 
				{
			        err += "\n\tPassword is empty";
				}
				
			    if(f.client_phone.value == '')
	            {
	                err += "\n\tType your phone";
	            }
				
	            if(f.elements['client_billing_name'].value == '') 
	            {
	                err += "\n\tType your billing name";
	            }
	            
	            if(f.elements['client_billing_adress1'].value == '') 
	            {
	                err += "\n\tType your billing address1";
	            }
	
	            if(f.elements['client_billing_city'].value == '') 
	            {
	                err += "\n\tType your billing city";
	            }

	            if(f.elements['client_billing_zip'].value == '') 
	            {
	                err += "\n\tType your billing zip";
	            }

	            if(f.elements['client_billing_phone'].value == '') 
	            {
	                err += "\n\tType your billing phone number";
	            }


	            
	            if(getRadioValue(f, "client_cctype") == -1)
	            {
	                err += "\n\t Do not select Credit Card";
	            }
	            
	            if(f.elements['client_ccnumber'].value == '') 
	            {
                    err += "\n\tType your credit card number";
	            }

	            if(f.elements['client_cccvv'].value == '') 
	            {
                    err += "\n\tType your cvv";
	            }

	            if(f.elements['client_ccholdername'].value == '') 
	            {
                    err += "\n\tType Credit Card Owner";
	            }




	            if(err != '') 
	            {
	                alert("You haven't fill all required fields:\n"+err);
	                return false;
	            }
	            return true;
	        }


//******************************************************************

//****************************************************************************************************************
	        
